﻿@{
    var currentUser = UserContext.CurrentUser;
    var currentSpaceUser = new UserService().GetFullUser(Url.SpaceKey());
    var registrationMode = DIContainer.Resolve<IUserSettingsManager>().Get().RegistrationMode;
}
<link href="~/Themes/Shared/DefaultStyle/css/style.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="@(Tunynet.Utilities.WebUtility.ResolveUrl("~/Scripts/jquery/DD_belatedPNG/jquery.DD_belatedPNG-0.0.8a.js"))"></script>
<![endif]-->

<div class="headerwrapper">
    <div class="header clr">
        <div class="header-inner">
            <h1 class="logo"><a href="@SiteUrls.Instance().SiteHome()" title="爱驿站"><span class="hide-clip">爱驿站</span></a></h1>
            <div class="toolbar"><img src="/Themes/Shared/DefaultStyle/images/right-ad.png" width="419" height="85" /></div>
        </div>
        <div class="nav">
            <ul>
                <li><a href="@SiteUrls.Instance().SiteHome()" target="_blank">首页</a></li>
                <li><a href="/finduser/home.aspx" target="_blank">搜索</a></li>
                <li><a href="/Channel/ZMemberDetail.aspx?spaceKey=@currentUser.UserName" target="_blank">我的驿站</a></li>
                <li><a href="/cms/c-1.aspx" target="_blank">加入我们</a></li>
                <li><a href="/Channel/ZMemberActivities.aspx" target="_blank">最新活动</a></li>
                <li><a href="/Channel/AnnouncementList.aspx" target="_blank">驿站通告</a></li>
                <li><a href="/cms/c-2.aspx" target="_blank">法律声明</a></li>
            </ul>
        </div>
    </div>
</div>
@*<div class="spb-top-menubar">
    <div class="tn-inner tn-helper-clearfix">
        <div class="spb-logo">
                <a href="@SiteUrls.Instance().SiteHome()">spacebuilder</a>
        </div>
        <div class="spb-user-menu">
            @if (currentUser != null)
            {
                <ul id="spb-user-menu" class="spb-user-act tn-drop-menu">
                    <li class="spb-current-user">
                        @Html.ShowUserAvatar(currentUser.UserId, AvatarSizeType.Micro, enableCachingInClient: false, isShowUserCard: false)
                        @{
                var homeUrl = currentUser != null ? SiteUrls.Instance().MyHome(currentUser.UserId) : SiteUrls.Instance().Login();
                        }
                        <a  class="tn-user-name" href="@homeUrl"  title="@currentUser.DisplayName">@Html.ShowUserDisplayName(currentUser.DisplayName, 6)</a></li>
                    <li class="tn-icon-menu">@Html.Link("注销", SiteUrls.Instance().Logout(), "注销", new { @class = "tn-icon tn-icon-quit" })</li>
                    <li class="tn-icon-menu"><a class="tn-icon tn-icon-email tn-msg-bubble-fix" title="消息"  name="messagePrompt" menu="#messagePrompt" url='@SiteUrls.Instance()._ListPrompt()'  href="@SiteUrls.Instance().ListMessageSessions(currentUser.UserName, null)">消息
                        @{int count = ViewData.Get<int>("PromptCount", 0);
                          if (count > 0)
                          {
                            <span class="tn-msg-bubble">@(count)</span>
                          }
                        }
                    </a>
                        @if (count > 0)
                        { 
                            <div id="messagePrompt" style="display: none" class="tn-widget tn-bubble tn-bubble-arrow-top tnc-prompt">
                                <div class="tn-bubble-arrow">
                                    <b class="tn-arrow-b1 tn-border-gray"></b><b class="tn-arrow-b2 tn-widget-bubble"></b>
                                </div>
                                <div class="tn-bubble-content tn-widget-content tn-border-gray tn-corner-all">
                                    <div class="tn-loading">
                                    </div>
                                </div>
                            </div>
                        }
                        else
                        { 
                            <ul class="tn-widget-content tn-border-gray spb-set-menu">
                                <li><a class="tn-item-link" href="@SiteUrls.Instance().ListMessageSessions(currentUser.UserName, null)">私信</a></li>
                                <li><a class="tn-item-link" href="@SiteUrls.Instance().ListInvitations(currentUser.UserName)">请求</a></li>
                                <li><a class="tn-item-link" href="@SiteUrls.Instance().ListNotices(currentUser.UserName, null, null)">通知</a></li>
                                <li><a class="tn-item-link" href="#">@@我的内容</a></li>
                                <li><a class="tn-item-link" href="@SiteUrls.Instance().AtMeComments(currentUser.UserName, null)">@@我的评论</a></li>
                            </ul>
                        }
                    </li>
                    <li class="tn-icon-menu"><a class="tn-icon tn-icon-set" title="设置" href="@SiteUrls.Instance().EditUserProfile(currentUser.UserName)">设置</a>
                        <ul class="tn-widget-content tn-border-gray spb-set-menu">
                            <li><a class="tn-item-link" href="@SiteUrls.Instance().EditUserProfile(currentUser.UserName)">编辑资料</a></li>
                            <li><a class="tn-item-link" href="@SiteUrls.Instance().UserPrivacyItemsSettings(currentUser.UserName)">隐私设置</a></li>
                            <li><a class="tn-item-link" href="@SiteUrls.Instance().UpdateIdentification(currentUser.UserName)">身份认证</a></li>
                            @if (ThemeService.Validate(PresentAreaKeysOfBuiltIn.UserSpace, currentSpaceUser.UserId))
                            { 
                                <li><a class="tn-item-link" href="@SiteUrls.Instance()._ThemeSettings(PresentAreaKeysOfBuiltIn.UserSpace, currentSpaceUser.UserId, true, currentSpaceUser.IsUseCustomStyle)" plugin="dialog">皮肤设置</a></li>
                            }
                            @if (currentUser.IsAllowEntryControlPannel())
                            {
                                <li><a class="tn-item-link" target="_blank" href="@SiteUrls.Instance().ManageHome()">后台管理</a></li>
                            }
                        </ul>
                    </li>
                </ul>
            }
            else
            {
                <ul class="spb-sign-menu">
                    <li>@Html.Link("登录", SiteUrls.Instance().Login(false, SiteUrls.LoginModal._LoginInModal), "登录", new { id = "login", plugin = "dialog", rel = "nofollow" })</li>
                    @if (registrationMode == RegistrationMode.All)
                    { 
                        <li>@Html.Link("注册", SiteUrls.Instance().Register(), "注册", new { rel = "nofollow" })</li>
                    }
                </ul>
            }
        </div>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        $('#spb-user-menu').dcMegaMenu({
            rowItems: '2',
            speed: 'fast',
            effect: 'fade',
            fullWidth: true
        });
        $(".tn-drop-menu ul a.tn-item-link").hover(
            function () {
                $(this).addClass("tn-bg-gray");
            },
            function () {
                $(this).removeClass("tn-bg-gray");
            });
    });
</script>*@
